package edu.guet.flyweight;

public class Main {

    public static void main(String[] args) {

        int extra = 22;

        FlyweightFactory factory = new FlyweightFactory();
        Flyweight flyweight = factory.getFlyweight("X");
        flyweight.operation(--extra);

        Flyweight flyweight1 = factory.getFlyweight("Y");
        flyweight1.operation(--extra);

        Flyweight flyweight2 = factory.getFlyweight("Z");
        flyweight2.operation(--extra);

        UnsharedConcreteFlyweight flyweight3 = new UnsharedConcreteFlyweight();
        flyweight3.operation(--extra);
    }
}
